const express = require('express');
const router = express.Router();

const ExamController = require('../controller/Exam');

router.get('/', (req, res) => {
  res.render('index', { title: 'Express' });
});


router.get('/exam/list', (req, res) => {
	res.header("Access-Control-Allow-Origin", "*");
	ExamController.examList((result) => {
		res.send(JSON.stringify(result));
	});
});


module.exports = router;
